package com.isoft.filelistener.dao;

import com.isoft.filelistener.entity.DfmeCklsDflt;
import com.isoft.filelistener.entity.DfmeCklsDfltCkls;
import com.isoft.filelistener.entity.DfmeCklsDfltCklsCntr;
import com.isoft.filelistener.entity.MetaData;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface DfmeCklsDao {
    @Insert("insert into TEAM_03.META(SENDER,RECEIVER,SEQUENCE,SENDTIME,TYPE,STYP,META_ID) " +
            "values(#{metaData.sender},#{metaData.receiver},#{metaData.sequence},#{metaData.sendTime},#{metaData.type},#{metaData.styp},#{id})")
    int InsertDfmeMeta(@Param("metaData") MetaData metaData, @Param("id") String id);

    @Insert("insert into TEAM_03.DFME_CKLS_DFLT(FLID,FFID,FIDE,FATT,META_ID) " +
            "values(#{dflt.flid},#{dflt.ffid},#{dflt.fide},#{dflt.fatt},#{id})")
    int InsertDfmeDflt(@Param("dflt")DfmeCklsDflt dflt, @Param("id") String id);

    @Insert("insert into TEAM_03.DFME_CKLS_DFLT_CKLS(FCES,FCEE,FCRS,FCRE,MCES,MCEE,MCRS,MCRE,FCDP,MCDP,DFLT_ID) " +
            "values(#{ckls.fces},#{ckls.fcee},#{ckls.fcrs},#{ckls.fcre},#{ckls.mces},#{ckls.mcee},#{ckls.mcrs},#{ckls.mcre},#{ckls.fcdp},#{ckls.mcdp},#{id})")
    int InsertDfmeCkls(@Param("ckls")DfmeCklsDfltCkls ckls, @Param("id") String id);

    @Insert("insert into TEAM_03.DFME_CKLS_DFLT_CKLS_CNTR(CKNO,CID,CODE,CKAT,TYPE,CCAR,ESTR,EEND,RSTR,REND,BTSC,CKLS_ID) " +
            "values(#{cntr.ckno},#{cntr.cid},#{cntr.code},#{cntr.ckat},#{cntr.type},#{cntr.ccar},#{cntr.estr},#{cntr.eend},#{cntr.rstr},#{cntr.rend},#{cntr.btsc},#{id})")
    int InsertDfmeCntr(@Param("cntr")DfmeCklsDfltCklsCntr cntr, @Param("id") String id);
}
